﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Meqs.Entity
{
    /// <summary>
    /// 学生评教活动
    /// </summary>
    [Serializable]
    public class StudentEvals
    {
        private int _rID;
        private string _seName;
        private DateTime? _startDate;
        private DateTime? _endDate;
        private int _templateID;
        private string _causeIDList;
        private int _schoolYear;
        private int _term;
        private int _state;
        private EvalType _evalType;

        public StudentEvals()
        {
        }

        public StudentEvals(int rID, string seName, DateTime? startDate, DateTime? endDate, int templateID, string causeIDList, int schoolYear, int term, int state, EvalType evalType)
        {
            _rID = rID;
            _seName = seName;
            _startDate = startDate;
            _endDate = endDate;
            _templateID = templateID;
            _causeIDList = causeIDList;
            _schoolYear = schoolYear;
            _term = term;
            _state = state;
            _evalType = evalType;
        }

        /// <summary>
        /// ID
        /// </summary>
        public int RID
        {
            get { return _rID; }
            set { _rID = value; }
        }

        /// <summary>
        /// 活动名称
        /// </summary>
        public string SeName
        {
            get { return _seName; }
            set { _seName = value; }
        }

        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime? StartDate
        {
            get { return _startDate; }
            set { _startDate = value; }
        }

        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime? EndDate
        {
            get { return _endDate; }
            set { _endDate = value; }
        }

        /// <summary>
        /// 使用的样表ID
        /// </summary>
        public int TemplateID
        {
            get { return _templateID; }
            set { _templateID = value; }
        }

        /// <summary>
        /// 课程ID
        /// </summary>
        public string CauseIDList
        {
            get { return _causeIDList; }
            set { _causeIDList = value; }
        }

        /// <summary>
        /// 学年
        /// </summary>
        public int SchoolYear
        {
            get { return _schoolYear; }
            set { _schoolYear = value; }
        }

        /// <summary>
        /// 学期
        /// </summary>
        public int Term
        {
            get { return _term; }
            set { _term = value; }
        }

        public bool Equals(StudentEvals other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;
            return other._rID == _rID;
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            if (ReferenceEquals(this, obj)) return true;
            if (obj.GetType() != typeof (StudentEvals)) return false;
            return Equals((StudentEvals) obj);
        }

        public override int GetHashCode()
        {
            return _rID;
        }

        public int State
        {
            get { return this._state; }
            set { this._state = value; }
        }

        public EvalType EvalType
        {
            get { return this._evalType; }
            set { this._evalType = value; }
        }
    }
}
